home *** CD-ROM | disk | FTP | other *** search
- {$M $1000,$1000,$1000}
- {$R+} { Range checking on }
- {$B-} { Boolean complete evaluation off }
- {$S-} { Stack checking off }
- {$I-} { I/O checking off }
- {$V-} { Relaxed variable checking }
-
- Program TestTmr;
-
- Uses Crt, Dos, Timers;
-
- var
- R : Registers;
-
- (*****************************************************************************)
-
- procedure CursorOff; { Turn off the cursor }
- begin
- with R do
- begin
- AX := 1*$100; { Set cursor size to nothing }
- CX := $2000; { Set bit 5 in CH for cursor off }
- intr ($10,Dos.Registers(R));
- end;
- end;
-
- procedure CursorOn; { Turn on the cursor }
- begin
- with R do
- begin
- AX := 1*$100; { Set cursor size }
- CX := $1010; { Set cursor to underline }
- intr ($10,Dos.Registers(R));
- end;
- end;
-
- (*****************************************************************************)
-
- begin
- ClrScr;
- CursorOff;
- TimerCounter := 10000;
- InitTimerInterupt; { Grabs timer vector and reroutes it }
- GoToXY (25, 24);
- write ('Press any key to exit');
-
- repeat
- GoToXY (30, 12); { TimerCounter is being decremented }
- write (TimerCounter : 5); { by the interrupt routine }
- until keypressed OR (TimerCounter = 0);
-
- ReleaseTimerInterupt; { Restores old vector }
- CursorOn;
- ClrScr;
- end.
-